package marchsoft.modules.four.h5.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface SettingMapper {
    //修改密码
    @Update("update e_student set password=#{password} where id =#{id} ")
    void updatePassword(@Param("password") String password,@Param("id") long id);

    //查询用户密码
    @Select("select password from e_student where id = #{id}")
    String selectPassById(@Param("id") long id);

    //查询用户手机号
    @Select("select id_card from e_student where id = #{id}")
    String selectPhoneById(@Param("id") long id);

    //修改手机号
    @Update("update e_student set id_card=#{phone} where id =#{id} ")
    int updatePhone(@Param("phone") String phone,@Param("id") long id);

    //修改头像
    @Update("update e_student set avatar_path = #{path} where id =#{id}")
    void updateAvatar(@Param("id") long id,@Param("path") String path);
}
